package edu.sctu.zcy.month201506.day20150611;

import java.util.*;

/**
 * Created by user24 on 2015/6/11.
 */
public class VectorDemo {

    public static void main(String[] args) {

        List<Integer> list = new ArrayList<>();
        Vector<Integer> vector = new Vector();
        for (int i = 0; i < 10 ; i++) {
            vector.add(i);
            list.add(i);
        }

        Iterator<Integer> i = vector.iterator();
        while (i.hasNext()){
            System.out.println(i.next());
        }

        Enumeration enumeration = vector.elements();
        while (enumeration.hasMoreElements()){
            System.out.println(enumeration.nextElement());
        }
    }
}
